Skip to content

userver: add static handler#644

Merged
MDA2AV merged 2 commits intoMDA2AV:mainfrom
botanegg:userver
Apr 26, 2026
Merged

userver: add static handler#644
MDA2AV merged 2 commits intoMDA2AV:mainfrom
botanegg:userver

Conversation

@botanegg
Copy link
Copy Markdown
Contributor

also remove unused bare implementation due benchmark target for production config

Description


PR Commands — comment on this PR to trigger (requires collaborator approval):

Command Description
/benchmark -f <framework> Run all benchmark tests
/benchmark -f <framework> -t <test> Run a specific test
/benchmark -f <framework> --save Run and save results (updates leaderboard on merge)

Always specify -f <framework>. Results are automatically compared against the current leaderboard.


Run benchmarks locally

You can validate and benchmark your framework locally with the lite script — no CPU pinning, fixed connection counts, all load generators run in Docker.

./scripts/validate.sh <framework>
./scripts/benchmark-lite.sh <framework> baseline
./scripts/benchmark-lite.sh --load-threads 4 <framework>

Requirements: Docker Engine on Linux. Load generators (gcannon, h2load, h2load-h3, wrk, ghz) are built as self-contained Docker images on first run.

also remove unused bare implementation due benchmark target for production config
@botanegg
Copy link
Copy Markdown
Contributor Author

/benchmark -f userver --save

@github-actions
Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: userver | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 610,648 6006.3% 217MiB +72.0% +11.9%
baseline 4096 991,183 6414.6% 430MiB -1.7% -1.6%
pipelined 512 1,448,830 6706.4% 259MiB -6.2% +3.6%
pipelined 4096 1,355,588 6629.4% 928MiB -4.0% +5.3%
static 1024 163,987 6605.4% 444MiB NEW NEW
static 4096 185,038 6449.9% 957MiB NEW NEW
static 6800 194,525 6568.4% 1.4GiB NEW NEW
Full log
  6773318 requests in 5.00s, 6773317 responses
  Throughput: 1.35M req/s
  Bandwidth:  185.99MB/s
  Status codes: 2xx=6773317, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 6773289 / 6773317 responses (100.0%)
[info] CPU 6683.7% | Mem 920MiB

[run 3/3]
gcannon v0.5.3
  Target:    localhost:8080/pipeline
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   48.30ms   48.40ms   57.00ms   64.20ms   69.60ms

  6777943 requests in 5.00s, 6777943 responses
  Throughput: 1.36M req/s
  Bandwidth:  186.11MB/s
  Status codes: 2xx=6777943, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 6777915 / 6777943 responses (100.0%)
[info] CPU 6629.4% | Mem 928MiB

=== Best: 1355588 req/s (CPU: 6629.4%, Mem: 928MiB) ===
[info] saved results/pipelined/4096/userver.json
httparena-bench-userver
httparena-bench-userver
[info] skip: userver does not subscribe to limited-conn
[info] skip: userver does not subscribe to json
[info] skip: userver does not subscribe to json-comp
[info] skip: userver does not subscribe to json-tls
[info] skip: userver does not subscribe to upload
[info] skip: userver does not subscribe to api-4
[info] skip: userver does not subscribe to api-16

==============================================
=== userver / static / 1024c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 1024 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     6.36ms    3.31ms  62.76ms   73.60%
    Req/Sec     2.56k   399.39    11.14k    97.45%
  831289 requests in 5.10s, 49.38GB read
Requests/sec: 162996.21
Transfer/sec:      9.68GB
[info] CPU 6513.8% | Mem 426MiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 1024 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     6.27ms    2.89ms  23.92ms   67.23%
    Req/Sec     2.57k   323.57    10.01k    98.10%
  834379 requests in 5.10s, 49.56GB read
Requests/sec: 163608.38
Transfer/sec:      9.72GB
[info] CPU 6614.3% | Mem 440MiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 1024 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     6.26ms    2.89ms  23.21ms   67.20%
    Req/Sec     2.58k   328.69    10.20k    98.10%
  836373 requests in 5.10s, 49.68GB read
Requests/sec: 163987.50
Transfer/sec:      9.74GB
[info] CPU 6605.4% | Mem 444MiB

=== Best: 163987 req/s (CPU: 6605.4%, Mem: 444MiB) ===
[info] saved results/static/1024/userver.json
httparena-bench-userver
httparena-bench-userver

==============================================
=== userver / static / 4096c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    22.43ms   10.75ms 114.23ms   69.26%
    Req/Sec     2.89k   448.65    13.23k    97.48%
  936772 requests in 5.10s, 55.65GB read
Requests/sec: 183676.53
Transfer/sec:     10.91GB
[info] CPU 6467.7% | Mem 971MiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    22.28ms   10.37ms  98.64ms   68.04%
    Req/Sec     2.90k   344.46    13.09k    97.24%
  940545 requests in 5.10s, 55.88GB read
Requests/sec: 184388.09
Transfer/sec:     10.95GB
[info] CPU 6548.2% | Mem 926MiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    22.28ms   10.69ms  97.48ms   69.08%
    Req/Sec     2.91k   332.87    10.57k    97.45%
  943657 requests in 5.10s, 56.06GB read
Requests/sec: 185038.26
Transfer/sec:     10.99GB
[info] CPU 6449.9% | Mem 957MiB

=== Best: 185038 req/s (CPU: 6449.9%, Mem: 957MiB) ===
[info] saved results/static/4096/userver.json
httparena-bench-userver
httparena-bench-userver

==============================================
=== userver / static / 6800c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    36.02ms   20.35ms 232.90ms   74.87%
    Req/Sec     3.05k   454.99    13.39k    97.27%
  986955 requests in 5.10s, 58.63GB read
Requests/sec: 193529.24
Transfer/sec:     11.50GB
[info] CPU 6461.7% | Mem 1.3GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    35.96ms   20.56ms 215.74ms   74.42%
    Req/Sec     3.06k   398.14    10.96k    96.38%
  992311 requests in 5.10s, 58.95GB read
Requests/sec: 194525.59
Transfer/sec:     11.56GB
[info] CPU 6568.4% | Mem 1.4GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    36.38ms   21.41ms 246.70ms   75.55%
    Req/Sec     3.04k   340.82     8.94k    95.64%
  984606 requests in 5.10s, 58.49GB read
Requests/sec: 193075.94
Transfer/sec:     11.47GB
[info] CPU 6469.3% | Mem 1.4GiB

=== Best: 194525 req/s (CPU: 6568.4%, Mem: 1.4GiB) ===
[info] saved results/static/6800/userver.json
httparena-bench-userver
httparena-bench-userver
[info] skip: userver does not subscribe to async-db
[info] skip: userver does not subscribe to crud
[info] skip: userver does not subscribe to baseline-h2
[info] skip: userver does not subscribe to static-h2
[info] skip: userver does not subscribe to baseline-h2c
[info] skip: userver does not subscribe to json-h2c
[info] skip: userver does not subscribe to baseline-h3
[info] skip: userver does not subscribe to static-h3
[info] skip: userver does not subscribe to gateway-64
[info] skip: userver does not subscribe to gateway-h3
[info] skip: userver does not subscribe to production-stack
[info] skip: userver does not subscribe to unary-grpc
[info] skip: userver does not subscribe to unary-grpc-tls
[info] skip: userver does not subscribe to stream-grpc
[info] skip: userver does not subscribe to stream-grpc-tls
[info] skip: userver does not subscribe to echo-ws
[info] rebuilding site/data/*.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/frameworks.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-6800.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
[info] restoring loopback MTU to 65536
[info] restoring CPU governor → powersave

@botanegg
Copy link
Copy Markdown
Contributor Author

/benchmark -f userver --save

@github-actions
Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: userver | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 788,559 6207.7% 218MiB +122.1% +12.4%
baseline 4096 964,683 6203.6% 444MiB -4.3% +1.6%
pipelined 512 1,442,519 6664.7% 263MiB -6.7% +5.2%
pipelined 4096 1,345,797 6711.5% 902MiB -4.7% +2.4%
static 1024 165,861 6614.1% 442MiB NEW NEW
static 4096 185,404 6578.0% 948MiB NEW NEW
static 6800 197,958 6377.0% 1.3GiB NEW NEW
Full log
  6728989 requests in 5.00s, 6728989 responses
  Throughput: 1.35M req/s
  Bandwidth:  184.77MB/s
  Status codes: 2xx=6728989, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 6728963 / 6728989 responses (100.0%)
[info] CPU 6711.5% | Mem 902MiB

[run 3/3]
gcannon v0.5.3
  Target:    localhost:8080/pipeline
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   48.66ms   48.80ms   57.40ms   64.50ms   69.80ms

  6727313 requests in 5.00s, 6727313 responses
  Throughput: 1.34M req/s
  Bandwidth:  184.71MB/s
  Status codes: 2xx=6727313, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 6727289 / 6727313 responses (100.0%)
[info] CPU 6685.9% | Mem 894MiB

=== Best: 1345797 req/s (CPU: 6711.5%, Mem: 902MiB) ===
[info] saved results/pipelined/4096/userver.json
httparena-bench-userver
httparena-bench-userver
[info] skip: userver does not subscribe to limited-conn
[info] skip: userver does not subscribe to json
[info] skip: userver does not subscribe to json-comp
[info] skip: userver does not subscribe to json-tls
[info] skip: userver does not subscribe to upload
[info] skip: userver does not subscribe to api-4
[info] skip: userver does not subscribe to api-16

==============================================
=== userver / static / 1024c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 1024 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     6.30ms    3.25ms  65.41ms   73.21%
    Req/Sec     2.59k   332.59    10.26k    97.27%
  838803 requests in 5.10s, 49.83GB read
Requests/sec: 164486.40
Transfer/sec:      9.77GB
[info] CPU 6544.1% | Mem 434MiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 1024 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     6.19ms    2.85ms  25.14ms   67.37%
    Req/Sec     2.61k   242.48     7.38k    97.06%
  845914 requests in 5.10s, 50.25GB read
Requests/sec: 165861.46
Transfer/sec:      9.85GB
[info] CPU 6614.1% | Mem 442MiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 1024 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     6.20ms    2.88ms  23.30ms   67.17%
    Req/Sec     2.60k   322.69     8.34k    98.07%
  844087 requests in 5.10s, 50.14GB read
Requests/sec: 165503.69
Transfer/sec:      9.83GB
[info] CPU 6600.9% | Mem 451MiB

=== Best: 165861 req/s (CPU: 6614.1%, Mem: 442MiB) ===
[info] saved results/static/1024/userver.json
httparena-bench-userver
httparena-bench-userver

==============================================
=== userver / static / 4096c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    22.21ms   10.25ms  89.26ms   67.98%
    Req/Sec     2.91k   400.95    12.67k    97.54%
  942482 requests in 5.10s, 55.99GB read
Requests/sec: 184813.08
Transfer/sec:     10.98GB
[info] CPU 6462.5% | Mem 938MiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    22.18ms   10.35ms 105.17ms   68.47%
    Req/Sec     2.91k   420.21    15.32k    97.64%
  945533 requests in 5.10s, 56.17GB read
Requests/sec: 185404.37
Transfer/sec:     11.01GB
[info] CPU 6578.0% | Mem 948MiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    22.20ms   10.21ms  94.18ms   67.99%
    Req/Sec     2.91k   296.71     9.11k    97.02%
  943219 requests in 5.10s, 56.04GB read
Requests/sec: 184931.09
Transfer/sec:     10.99GB
[info] CPU 6481.6% | Mem 953MiB

=== Best: 185404 req/s (CPU: 6578.0%, Mem: 948MiB) ===
[info] saved results/static/4096/userver.json
httparena-bench-userver
httparena-bench-userver

==============================================
=== userver / static / 6800c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    34.78ms   18.36ms 179.89ms   70.06%
    Req/Sec     3.11k   440.45    12.29k    96.96%
  1007995 requests in 5.10s, 59.88GB read
Requests/sec: 197596.52
Transfer/sec:     11.74GB
[info] CPU 6456.0% | Mem 1.3GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    34.67ms   17.16ms 169.55ms   69.92%
    Req/Sec     3.10k   390.22    14.36k    97.14%
  1005790 requests in 5.10s, 59.75GB read
Requests/sec: 197227.92
Transfer/sec:     11.72GB
[info] CPU 6537.0% | Mem 1.3GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    34.88ms   18.73ms 210.41ms   71.90%
    Req/Sec     3.12k   391.56    10.12k    96.10%
  1009552 requests in 5.10s, 59.97GB read
Requests/sec: 197958.71
Transfer/sec:     11.76GB
[info] CPU 6377.0% | Mem 1.3GiB

=== Best: 197958 req/s (CPU: 6377.0%, Mem: 1.3GiB) ===
[info] saved results/static/6800/userver.json
httparena-bench-userver
httparena-bench-userver
[info] skip: userver does not subscribe to async-db
[info] skip: userver does not subscribe to crud
[info] skip: userver does not subscribe to baseline-h2
[info] skip: userver does not subscribe to static-h2
[info] skip: userver does not subscribe to baseline-h2c
[info] skip: userver does not subscribe to json-h2c
[info] skip: userver does not subscribe to baseline-h3
[info] skip: userver does not subscribe to static-h3
[info] skip: userver does not subscribe to gateway-64
[info] skip: userver does not subscribe to gateway-h3
[info] skip: userver does not subscribe to production-stack
[info] skip: userver does not subscribe to unary-grpc
[info] skip: userver does not subscribe to unary-grpc-tls
[info] skip: userver does not subscribe to stream-grpc
[info] skip: userver does not subscribe to stream-grpc-tls
[info] skip: userver does not subscribe to echo-ws
[info] rebuilding site/data/*.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/frameworks.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-6800.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
[info] restoring loopback MTU to 65536
[info] restoring CPU governor → powersave

@botanegg
Copy link
Copy Markdown
Contributor Author

@MDA2AV ready to merge now

@MDA2AV MDA2AV merged commit 61d6366 into MDA2AV:main Apr 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants